package com.finger.common.exception;

public enum BizCodeEnume {

    /*
    错误码列表：
    10：通用
    11：商品
    12：订单
    13：购物车
    14：物流
    15：会员
     */

    /**
     * 通用
     */
    UNKNOW_EXCEPTION(10000, "系统未知异常"),
    VALID_EXCEPTION(10001, "参数校验异常"),


    /**
     * 会员服务
     */
    MEMBER_USERNAME_REPET(15001,"用户名重复"),
    MEMBER_LOGINACCT_SUCCESS(15004,"用户登录成功"),
    MEMBER_LOGINACCT_FAILD(15003,"账号或密码错误"),

    /**
     * 库存服务
     */
    WARE_NO_STOCK(21000,"商品库存不足");

    private int code;
    private String msg;

    BizCodeEnume(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
